#ifndef XPROGRESS_BAR_H
#define XPROGRESS_BAR_H

#ifdef XEXPORTING
#define XEXPORT_DLL __declspec(dllexport)
#else
#define XEXPORT_DLL __declspec(dllimport)
#endif

#include <XGui\XWidget.h>

class XEXPORT_DLL XProgressBar : public XWidget
{
private:
	int MaxValue;
	int Value;

	XRenderPack* Bar;

	void _loadVertices();
	void _loadTextureVertices();

	void _loadBarVertices();
	void _loadBarTextureVertices();
public:
	XProgressBar(XHash hash, XWindow* parentWindow);

	int GetValue();
	void SetGeometry(XRectangle rect);
	void SetValue(int value);
	void AddValue(int value);
	void SetMaxValue(int value);

	void SetDisable();
	void SetEnable();

	void Update(XInputModule* input);
};

#endif